package com.designpattern.DecoratorPattern;

/**
 * @Author yp
 * @Date 2021-05-24
 * @Description 测试类
 **/

public class Test {

    public static void main(String[] args) {
        Man man = new Man();
        ManDecoratorA mDA = new ManDecoratorA();
        ManDecoratorB mDB = new ManDecoratorB();

        mDA.setPerson(man);
        mDA.eat();

        mDB.setPerson(man);
        mDB.eat();
    }
}
